home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / rpc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  2.6 KB  |  165 lines

  1. /*++
  2.  
  3. Copyright (c) 1991-1997 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     rpc.h
  8.  
  9. Abstract:
  10.  
  11.     Master include file for RPC applications.
  12.  
  13. --*/
  14.  
  15. #ifndef RPC_NO_WINDOWS_H
  16. #include <windows.h>
  17. #endif // RPC_NO_WINDOWS_H
  18.  
  19. #ifndef __RPC_H__
  20. #define __RPC_H__
  21. #pragma option push -b
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26.  
  27. #define __RPC_WIN32__
  28.  
  29. #ifndef __MIDL_USER_DEFINED
  30. #define midl_user_allocate MIDL_user_allocate
  31. #define midl_user_free     MIDL_user_free
  32. #define __MIDL_USER_DEFINED
  33. #endif
  34.  
  35. typedef void * I_RPC_HANDLE;
  36. typedef long RPC_STATUS;
  37.  
  38. #define RPC_UNICODE_SUPPORTED
  39.  
  40. #if   (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
  41. #define __RPC_FAR
  42. #define __RPC_API  __stdcall
  43. #define __RPC_USER __stdcall
  44. #define __RPC_STUB __stdcall
  45. #define  RPC_ENTRY __stdcall
  46. #else
  47. #define __RPC_FAR
  48. #define __RPC_API
  49. #define __RPC_USER
  50. #define __RPC_STUB
  51. #endif
  52.  
  53. // Some RPC platforms don't define DECLSPEC_IMPORT
  54.  
  55. #if !defined(DECLSPEC_IMPORT)
  56. #if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
  57. #define DECLSPEC_IMPORT __declspec(dllimport)
  58. #else
  59. #define DECLSPEC_IMPORT
  60. #endif
  61. #endif
  62.  
  63. #if !defined(_RPCRT4_)
  64. #define RPCRTAPI DECLSPEC_IMPORT
  65. #else
  66. #define RPCRTAPI
  67. #endif
  68.  
  69. #if !defined(_RPCNS4_)
  70. #define RPCNSAPI DECLSPEC_IMPORT
  71. #else
  72. #define RPCNSAPI
  73. #endif
  74.  
  75. #ifdef IN
  76. #undef IN
  77. #undef OUT
  78. #undef OPTIONAL
  79. #endif /* IN */
  80.  
  81. #include <rpcdce.h>
  82. #include <rpcnsi.h>
  83. #include <rpcnterr.h>
  84.  
  85.  
  86. #include <excpt.h>
  87. #include <winerror.h>
  88.  
  89. #define RpcTryExcept \
  90.     __try \
  91.         {
  92.  
  93. // trystmts
  94.  
  95. #define RpcExcept(expr) \
  96.         } \
  97.     __except (expr) \
  98.         {
  99.  
  100. // exceptstmts
  101.  
  102. #define RpcEndExcept \
  103.         }
  104.  
  105. #define RpcTryFinally \
  106.     __try \
  107.         {
  108.  
  109. // trystmts
  110.  
  111. #define RpcFinally \
  112.         } \
  113.     __finally \
  114.         {
  115.  
  116. // finallystmts
  117.  
  118. #define RpcEndFinally \
  119.         }
  120.  
  121. #define RpcExceptionCode() GetExceptionCode()
  122. #define RpcAbnormalTermination() AbnormalTermination()
  123.  
  124. RPCRTAPI
  125. RPC_STATUS
  126. RPC_ENTRY
  127. RpcImpersonateClient (
  128.     IN RPC_BINDING_HANDLE BindingHandle OPTIONAL
  129.     );
  130.  
  131. RPCRTAPI
  132. RPC_STATUS
  133. RPC_ENTRY
  134. RpcRevertToSelfEx (
  135.     IN RPC_BINDING_HANDLE BindingHandle OPTIONAL
  136.     );
  137.  
  138. RPCRTAPI
  139. RPC_STATUS
  140. RPC_ENTRY
  141. RpcRevertToSelf (
  142.     );
  143.  
  144. RPCRTAPI
  145. long
  146. RPC_ENTRY
  147. I_RpcMapWin32Status (
  148.     IN RPC_STATUS Status
  149.     );
  150.  
  151. // Definitions which depend on windows.h
  152. #ifndef RPC_NO_WINDOWS_H
  153.  
  154. #include <rpcasync.h>
  155.  
  156. #endif // RPC_NO_WINDOWS_H
  157.  
  158. #ifdef __cplusplus
  159. }
  160. #endif
  161.  
  162. #pragma option pop
  163. #endif // __RPC_H__
  164.  
  165.